<?php
$this->title = "Expediente";
$this->headTitle($this->title);
?>

 <div class="pure-form pure-form-aligned">       
    <form class="pure-form pure-form-aligned" enctype="application/x-www-form-urlencoded" action="<?php echo $this->url(array('controller'=>'Expediente',
            'action'=>'find'));?>" method="post" id = 'form'>
 
    <fieldset>              
        <div class="alignTableMaintenance">
        <?php if(count($this->expedientes) != 0 ):?>
            <table class="pure-table pure-table-bordered">
            <thead>
                <tr>
                    <th>Placa</th>
                    <th>Fecha</th>
                    <th>Observaciones</th>
                    <th>TotalServicio</th>
                    <th>TotalRepuesto</th>
                    <th style="width: 50px;">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach($this->expedientes as $expediente) : ?>
                <tr>
                    <td><?php echo $this->escape($expediente['placa']);?></td>
                    <td><?php echo $this->escape($expediente['fecha']);?></td>
                    <td><?php echo $this->escape($expediente['observaciones']);?></td>
                    <td><?php echo $this->escape($expediente['totalServicio']);?></td>
                    <td><?php echo $this->escape($expediente['totalRepuesto']);?></td>

                     <td>
                        <a href="<?php echo $this->url(array('controller'=>'Record',
                            'action'=>'edit', 'placa'=>$expediente['id']));?>"><img class="edit"/></a>
                        <a href="#" onclick="deleteActionProforma($('#form'),'<?php echo $this->escape($expediente['id']);?>','<?php echo $this->escape($expediente['placa']);?>')"><img class="delete"/></a>
                    </td>
                       
                </tr>
                <?php endforeach; ?>
            </tbody>
            </table>
        <div id="dialog-confirm" title="¿Eliminar registro?" style="display:none">
            <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Este registro será borrado permanentemente y no podrá ser recuperado. ¿Esta seguro que desea eliminarlo?</p>
        </div>
        
        <?php endif ?> 
     </div>
    </fieldset>
    </form>    
</div>